package com.ktwlsoft.archivemanage.payload.operationLog;

import com.ktwlsoft.archivemanage.domain.dao.entity.EditHistory;
import com.ktwlsoft.archivemanage.domain.dao.entity.OperationLog;
import com.ktwlsoft.archivemanage.service.utils.SnowFlake;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 列表返回实体
 *
 * @author Name on 2019/11/21 17:42
 * @version 1.0
 */
@ApiModel("通用操作日志")
@Setter
@Getter
public class FindByPageResult {

    @ApiModelProperty("id")
    private Long id = SnowFlake.getNextId();

    @ApiModelProperty("操作类型")
    private OperationLog.OperationType type;

    @ApiModelProperty("路径")
    private String route;

    @ApiModelProperty("操作人")
    private String operator;

    @ApiModelProperty("操作人Id")
    private Long operatorId;

    @ApiModelProperty("id地址")
    private String ip;

    @ApiModelProperty("操纵时间")
    private Date operateTime;

    @ApiModelProperty("业务类型")
    private OperationLog.BusinessType businessType;

    @ApiModelProperty("描述")
    private String description;

    /**旧值**/
    @ApiModelProperty("旧值")
    private String oldValue;

    /**新值**/
    @ApiModelProperty("新值")
    private String newValue;

    /**业务来源*/
    @ApiModelProperty("业务来源")
    private EditHistory.BusinessFrom businessFrom;
}